class Solution:
    def isArraySpecial(self, nums: list[int]) -> bool:
        n = len(nums)
        for i in range(1, n):
            if nums[i - 1] % 2 == nums[i] % 2:
                return False
        return True


nums = [2, 1, 4]
aa = Solution()
bb = aa.isArraySpecial(nums)
print(bb)
